import datetime
import os

#str(datetime.datetime.now().date())
#word = docx.Document()
#file_name = "meeting"
#word.add_paragraph("文件路径覆盖测试！！！")
#print(file_name)
#path = basedir + '\\' + str(datetime.datetime.now().date())

# start_tim_f = start_tim.strftime('%Y-%m-%d %H:%M:%S')
    # text.addText().add_paragraph("会议开始时间:"+start_tim_f)
    # cur_tim = datetime.datetime.now()
    # for item in myInfo:#从数组里面取出转写的结果
    # cur_tim_f = time.strftime("%Y-%m-%d-%H:%M:%S", cur_tim)  # 这一步就是对时间进行格式化
basedir = os.path.abspath(os.path.dirname(__file__))
print(basedir)

path = basedir + '\\' + "files"
print(path)


file_path = path + '\\' + str(datetime.datetime.now().strftime("%Y-%m-%d-%H")) + '.docx'
print(file_path)


from starlette.responses import FileResponse

curpath = os.path.abspath(os.curdir)
basedir = os.path.abspath(os.path.dirname(__file__))
       # path = basedir + '\\' + "files"
      #  filename = basedir + '\\' + "files" + "\\" + str(datetime.datetime.now().date()) + ".docx"
        #str = datetime.now().strftime("%Y%m%d_%H%M")
        #print(curpath+"files")
        #../files/
        #D:\\Pycharm\\audiosss\\files\\

def main(file_name: str):
    print(file_name)
    basedir = os.path.abspath(os.path.dirname(__file__))
    path = basedir + '\\' + str(datetime.datetime.now().date())
    file_path = path + '\\' + file_name + '.xlsx'
    print(file_path)
    return FileResponse(file_path)
#word.save(path)
